package com.eh.state;

import com.eh.state.model.GumballMachine;

/**
 * Created by David on 2016/5/1.
 */
public class StateDriveTest {
    public static void main(String[] args) {
        GumballMachine gumballMachine = new GumballMachine(5);
        for (int i = 0; i < 6; i++) {
            testSell(gumballMachine);
        }
    }

    private static void testSell(GumballMachine gumballMachine) {
        gumballMachine.insertQuarter();
        gumballMachine.turnCrank();
    }
}
